clear all;
close all;
clc

cd  E:\ReplicateBuild\02_code\03_matlab


% This runs model-related code

% this function translates some stata estimates to matlab
transfer_stata_estimates_to_matlab

% this function estimates various versions of the teacher preference model
wrapper_teacher_pref

% this function estimates various versions of the principal rating model
wrapper_princpal_pref

% these functions produce bivariate plots 
bivariate_preference_relationships
bivariate_preference_relationships_noVA

% Given that there are estimates of teacher preferences and principal
% preferences this finds allocations and plots outcomes


% this function computes a wide variety of equilibrium allocations
compute_allocations 

% this function create a table of allocations, including robustness

create_allocation_table
create_robustness_table
create_imputation_table
create_monthbymonth_table
create_serialdict_table


% this function plots output that is computed in compute_allocations
plot_output

%%
% this function computes allocations with various principal bonuses and
% then plots outbut

compute_bonuses

% this function plots the output that is computed in bonuses

plot_bonuses 

%%
% this function calculates potential gains. It is run in the middle of 
% production_section_tables.do

potential_gains
